home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 August / macformat-027.iso / mac / Shareware City / Developers / Oberon⁄F / Mac / Mod / ResourceMgr (.txt) < prev    next >
Encoding:
Oberon Document  |  1994-06-07  |  6.9 KB  |  140 lines  |  [oODC/obnF]

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. Stores.StoreDesc
  11. TextViews.StdViewDesc
  12. TextViews.ViewDesc
  13. Containers.ViewDesc
  14. Views.ViewDesc
  15. Stores.StoreDesc
  16. TextModels.StdModelDesc
  17. TextModels.ModelDesc
  18. Containers.ModelDesc
  19. Models.ModelDesc
  20. Stores.ElemDesc
  21. Stores.StoreDesc
  22. TextModels.AttributesDesc
  23. Stores.StoreDesc
  24. Geneva
  25. TextModels.AttributesDesc
  26. Stores.StoreDesc
  27. Geneva
  28. StdStamps.StdViewDesc
  29. Views.ViewDesc
  30. Stores.StoreDesc
  31. TextModels.AttributesDesc
  32. Stores.StoreDesc
  33. Geneva
  34. TextModels.AttributesDesc
  35. Stores.StoreDesc
  36. Geneva
  37. MODULE MacResourceMgr;
  38. (* cp 
  39.     ResType is LONGINT, not ARRAY 4 OF CHAR
  40.     IMPORT SYSTEM, MacTypes, MacFileMgr;
  41.     CONST
  42.         resSysHeap* = 64;
  43.         resPurgeable* = 32;
  44.         resLocked* = 16;
  45.         resProtected* = 8;
  46.         resPreload* = 4;
  47.         resChanged* = 2;
  48.         mapReadOnly* = 128;
  49.         mapCompact* = 64;
  50.         mapChanged* = 32;
  51.         TEXT* = 54455854H;
  52.         FONT* = 464F4E54H;
  53.         DRVR* = 44525652H;
  54.         DLOG* = 444C4F47H;
  55.         DITL* = 4449544CH;
  56.         STRlist* = 53545223H;
  57.         PATlist* = 50415423H;
  58.         CODE = 1;
  59.     TYPE ResType* = MacTypes.ResType;
  60.     (** Opening and Closing Resource Files **)
  61.     PROCEDURE [CODE] CreateResFile* (fileName: MacTypes.Str255) 0A9H, 0B1H;
  62.     PROCEDURE [CODE] OpenResFile* (filename: MacTypes.Str255): INTEGER 0A9H, 097H;
  63.     PROCEDURE [CODE] CloseResFile* (refNum: INTEGER) 0A9H, 09AH;
  64.     PROCEDURE [CODE] FSpOpenResFile*(spec: MacFileMgr.FSSpec; permission: MacTypes.SignedByte): INTEGER 030H, 03CH, 000H, 00DH, 0AAH, 052H;
  65.     PROCEDURE [CODE] FSpCreateResFile*(spec: MacFileMgr.FSSpec; creator, fileType: MacTypes.OSType; scriptTag: INTEGER) 030H, 03CH, 000H, 00EH, 0AAH, 052H;
  66.     (** Checking for Errors **)
  67.     PROCEDURE [CODE] ResError* (): INTEGER 0A9H, 0AFH;
  68.     (** Setting the Current Resource File **)
  69.     PROCEDURE [CODE] CurResFile* (): INTEGER 0A9H, 094H;
  70.     PROCEDURE [CODE] HomeResFile* (theResource: MacTypes.Handle): INTEGER 0A9H, 0A4H;
  71.     PROCEDURE [CODE] UseResFile* (refNum: INTEGER) 0A9H, 098H;
  72.     (** Getting Resource Types **)
  73.     PROCEDURE [CODE] CountTypes* (): INTEGER 0A9H, 09EH;
  74.     PROCEDURE [CODE] GetIndType* (VAR theType: ResType; index: INTEGER) 0A9H, 09FH;
  75.     (** Getting and Disposing of Resources **)
  76.     PROCEDURE [CODE] SetResLoad* (load: BOOLEAN) 0A9H, 09BH;
  77.     PROCEDURE [CODE] CountResources* (theType: ResType): INTEGER 0A9H, 09CH;
  78.     PROCEDURE [CODE] GetIndResource* (theType: ResType; index: INTEGER): MacTypes.Handle 0A9H, 09DH;
  79.     PROCEDURE [CODE] GetResource* (theType: ResType; theID: INTEGER): MacTypes.Handle 0A9H, 0A0H;
  80.     PROCEDURE [CODE] GetNamedResource* (theType: ResType; name: MacTypes.Str255): MacTypes.Handle 0A9H, 0A1H;
  81.     PROCEDURE [CODE] LoadResource* (theResource: MacTypes.Handle) 0A9H, 0A2H;
  82.     PROCEDURE [CODE] ReleaseResource* (theResource: MacTypes.Handle) 0A9H, 0A3H;
  83.     PROCEDURE [CODE] DetachResource* (theResource: MacTypes.Handle) 0A9H, 092H;
  84.     (** Getting Resource Information **)
  85.     PROCEDURE [CODE] UniqueID* (theType: ResType): INTEGER 0A9H, 0C1H;
  86.     PROCEDURE [CODE] GetResInfo* (theResource: MacTypes.Handle; VAR theID: INTEGER;
  87.                         VAR theType: ResType; VAR name: MacTypes.Str255) 0A9H, 0A8H;
  88.     PROCEDURE [CODE] GetResAttrs* (theResource: MacTypes.Handle): MacTypes.Set 0A9H, 0A6H;
  89.     PROCEDURE [CODE] SizeResource* (theResource: MacTypes.Handle): LONGINT 0A9H, 0A5H;
  90.     (** Modifying Resources **)
  91.     PROCEDURE [CODE] SetResInfo* (theResource: MacTypes.Handle; theID: INTEGER;
  92.                         name: MacTypes.Str255) 0A9H, 0A9H;
  93.     PROCEDURE [CODE] SetResAttrs* (theResource: MacTypes.Handle; attrs: MacTypes.Set) 0A9H, 0A7H;
  94.     PROCEDURE [CODE] ChangedResource* (theResource: MacTypes.Handle) 0A9H, 0AAH;
  95.     PROCEDURE [CODE] AddResource* (theData: MacTypes.Handle; theType: ResType;
  96.                         theID: INTEGER; name: MacTypes.Str255) 0A9H, 0ABH;
  97.     PROCEDURE [CODE] RmveResource* (theResource: MacTypes.Handle) 0A9H, 0ADH;
  98.     PROCEDURE [CODE] UpdateResFile* (refNum: INTEGER) 0A9H, 099H;
  99.     PROCEDURE [CODE] WriteResource* (theResource: MacTypes.Handle) 0A9H, 0B0H;
  100.     PROCEDURE [CODE] SetResPurge* (install: BOOLEAN) 0A9H, 093H;
  101.     (** Advanced Routines **)
  102.     PROCEDURE [CODE] GetResFileAttrs* (refNum: INTEGER): MacTypes.Set 0A9H, 0F6H;
  103.     PROCEDURE [CODE] SetResFileAttrs* (refNum: INTEGER; attrs: MacTypes.Set) 0A9H, 0F7H;
  104.     (** 128K ROM **)
  105.     PROCEDURE [CODE] Count1Types* (): INTEGER 0A8H, 01CH;
  106.     PROCEDURE [CODE] Get1IndType* (VAR theType: ResType; index: INTEGER) 0A8H, 00FH;
  107.     PROCEDURE [CODE] Count1Resources* (theType: ResType): INTEGER 0A8H, 00DH;
  108.     PROCEDURE [CODE] Get1IndResource* (theType: ResType; index: INTEGER): MacTypes.Handle 0A8H, 00EH;
  109.     PROCEDURE [CODE] Get1Resource* (theType: ResType; theID: INTEGER): MacTypes.Handle 0A8H, 01FH;
  110.     PROCEDURE [CODE] Get1NamedResource* (theType: ResType; name: MacTypes.Str255): MacTypes.Handle 0A8H, 020H;
  111.     PROCEDURE [CODE] Unique1ID* (theType: ResType): INTEGER 0A8H, 010H;
  112.     PROCEDURE [CODE] MaxSizeRsrc* (theResource: MacTypes.Handle): LONGINT 0A8H, 021H;
  113.     PROCEDURE [CODE] RsrcMapEntry* (theResource: MacTypes.Handle): LONGINT 0A9H, 0C5H;
  114.     PROCEDURE [CODE] OpenRFPerm* (fileName: MacTypes.Str255; vRefNum: INTEGER; 
  115.                         permission: MacTypes.UnpackedByte): INTEGER 0A9H, 0C4H;
  116. END MacResourceMgr.
  117. TextControllers.StdCtrlDesc
  118. TextControllers.ControllerDesc
  119. Containers.ControllerDesc
  120. Controllers.ControllerDesc
  121. Stores.StoreDesc
  122. TextRulers.StdRulerDesc
  123. TextRulers.RulerDesc
  124. Views.ViewDesc
  125. Stores.StoreDesc
  126. TextRulers.StdStyleDesc
  127. TextRulers.StyleDesc
  128. Models.ModelDesc
  129. Stores.ElemDesc
  130. Stores.StoreDesc
  131. TextRulers.AttributesDesc
  132. Stores.StoreDesc
  133. TextModels.AttributesDesc
  134. Stores.StoreDesc
  135. Geneva
  136. Documents.ControllerDesc
  137. Containers.ControllerDesc
  138. Controllers.ControllerDesc
  139. Stores.StoreDesc
  140.